The present invention relates to a data compression method and apparatus and, more particularly, to a data compression method and apparatus for compressing and outputting an analog input signal.
Conventionally, when one- or two-dimensional analog data such as audio data, mechanical vibration waveform, and image are to be compressed, the data are temporarily sampled on the time axis, quantized into digital data by an A/D converter, and compressed by digital arithmetic processing.
Digital data (original data) are compressed and reconstructed by a loss-less compression method of completely reconstructing the original data or a lossy compression method by which part of the original data is lost. The present invention approximates sampled data by another waveform, so that the lossy compression method will be explained.
As shown in FIGS. 12A and 12B, conventional compression processes are roughly classified into a method using orthogonal transform and a method using function approximation.
According to the method using orthogonal transform, as shown in FIG. 12A, an analog input signal is sampled and quantized by a sampling unit 91 and quantization unit 92, respectively. The original data (digital data) output from the quantization unit 92 is divided into small sections by an orthogonal transform unit 93A.
Each section is decomposed into frequency space elements by orthogonal transform such as Fourier transform, DCT (Discrete Cosine Transform), or Walsh transform. This decreases the correlation degree between respective sample point on the original data.
The magnitude of each frequency element after orthogonal transform is encoded by a parameter encoder 94 using a code table, thereby obtaining compressed data.
According to the method using function approximation, as shown in FIG. 12B, the orthogonal transform unit 93A is replaced by a function approximation unit 93B. The feature of each section of original data (digital data) output from the quantization unit 92 is approximated by any function.
The approximated bit data (digital data) is encoded by the parameter encoder 94 using a variable-length coding table of Huffman coding or the like.
As orthogonal transform, there is proposed a method using orthogonal transform such as Slant, Haar, or Wavelet, in addition to the above transform methods. An appropriate orthogonal transform method is used in consideration of various factors such as the property and simple calculation of original data, simple circuit arrangement, and simple high-speed processing.
Further, the following method is also used. Quantized digital data is segmented into small data sections in the original data space (real space), each section is approximated using a simple algebraic curve (e.g., a straight line which approximates each data section), and the algebraic function coefficient is compressed and stored.
To the contrary, methods of reconstructing the original data waveform from compressed data can be roughly classified into a method using orthogonal transform and a method using function approximation.
According to the compression method shown in FIG. 13A using orthogonal transform, a parameter decoder 95 calculates orthogonal transform coefficients from compressed data using a code table.
An inverse orthogonal transform unit 96A performs inverse orthogonal transform using these coefficients to calculate approximate data of original data for each section. A D/A converter 97 converts the data into an analog signal to obtain an analog output signal approximated to the original data through a low-pass filter 98.
According to the method using function approximation, as shown in FIG. 13B, the inverse orthogonal transform unit is replaced by a function approximation unit 96B. The function approximation unit 96B performs function approximation using coefficients obtained by the parameter decoder 95, thereby calculating approximate data of original data for each section.
In general, the orthogonal transform unit 93A and inverse orthogonal transform unit 96A are identical circuits as hardware, and are different only in calculation contents.
Also, the function approximation units 93B and 96B are identical circuits as hardware.
However, in each conventional data compression method, the value (sample value) of each sample point after sampling is quantized (digital) data, and the data is compressed by operating the digital value. Compression using this quantized digital data causes a rounding error at the least significant bit by a plurality of times of processing in compression. The compression algorithm decreases the bit precision of the sample value.
A higher compression ratio rapidly decreases the approximate degree of the waveform after compression/reconstruction with respect to the original waveform (sampling string). The quality of reconstructed data greatly degrades with an increase in compression ratio.
In addition, the conventional digital data compression must execute a large number of digital numerical calculations in function approximation, orthogonal transform, and encoding.
For example, letting k be the number of points in the section, 2k product-sum calculations or klog 2k product-sum calculations even using a high-speed calculation method must be done for orthogonal transform.
Similarly, product-sum calculation must be done for reconstruction. When the above high-speed calculation method is used, the number k of calculation points must satisfy 2J=k (J is a positive integer).
Even in processing of compressing data by substituting it into the algebraic curve in the real space, many calculations must be done to search for a coefficient almost free from any error in approximation calculation using the algebraic curve.
For this reason, when audio data and image data are to be compressed, a high-speed A/D converter, high-speed MPU, digital signal processor (DSP), and the like are required to shorten the data compression time in application fields necessary for very-high-speed processing, e.g., real-time compression.
Hence, an integrated circuit (IC) dedicated for each processing must be developed and manufactured, and a high-speed MPU must be used for processing. This increases the product development cost, product cost, and power consumption.